__author__ = 'buxiangjie'
"""
@time: 2024/2/9 22:28
"""

import allure
from selenium.webdriver.common.by import By
from common.base import Base
from baidu.baidu_pages.baidu_news import News


class Index(Base):
	# 新闻tab
	news_tab = (By.LINK_TEXT, '新闻')

	@allure.step("点击新闻tab")
	def click_news(self):
		"""
		点击新闻tab
		"""

		self.element_click(*self.news_tab)
		self.switch_to_frame()
		return News(self.driver)
